package com.xq.demo;

import com.alibaba.fastjson.JSON;
import org.apache.commons.lang3.StringUtils;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class StreamTest {

    public static void main(String[] args) {
        List<String> strings = Arrays.asList("abc", "", "bc", "efg", "abcd","", "jkl");
       /* List<String> list = strings.stream().filter(c->(StringUtils.isNotBlank(c) || StringUtils.isBlank(c))).collect(Collectors.toList());
        System.out.println(JSON.toJSONString(list));*/
       /* strings.stream().forEach(c->{
            System.out.println(c);
        });*/
        strings.stream().sorted((s1,s2)->1).collect(Collectors.toList()).forEach(c->{ System.out.println(c);});

    }
}
